#ifndef DS1302_TIME_H
#define DS1302_TIME_H

#define Time_Second 0x80
#define Time_Minute 0x82
#define Time_Hour 0x84
#define Time_Day 0x86
#define Time_Month 0x88
#define Time_Week 0x8a
#define Time_Year 0x8c
#define WP 0x8e


typedef struct Time
{
    unsigned char Year;
    unsigned char Month;
    unsigned char Day;
    unsigned char Hour;
    unsigned char Minute;
    unsigned char Second;
    unsigned char Weekday;
}Time;
//extern unsigned char Time[7];

extern Time time;

void DS1302_Init();
void DS1302_Write(unsigned char Command, unsigned char Data);
unsigned char DS1302_Read(unsigned char Command);
void DS1302_SetTime();//设置时间
void DS1302_Showtime();//显示时间


#endif